package com.javalab._7thread._3Lock._3JUC._2Condition;

public class Producer extends Thread {
    private MyStack myStack;
    public Producer(MyStack myStack) {
        this.myStack = myStack;
    }

    @Override
    public void run() {
        try {
            for (int i = 0; i < 1000; i++) {
                myStack.push(i);
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
